<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>设置属性</title>
</head>
<body>
	<p id="text" >文本</p>
	<script type="text/javascript">
		var p=document.getElementById("text");
		//更改添加p标签的class属性
		p.setAttribute("class","red");
		p.setAttribute("isRead","false");
	</script>
</body>
</html>